package com.settlement.system.common.enums;

import com.settlement.system.common.base.IBaseEnum;
import lombok.Getter;

/**
 * 状态枚举
 *
 * @author haoxr
 * @since 2022/10/14
 */
public enum ReceivableInvoiceStatusEnum implements IBaseEnum<Integer> {

    NO(0, "未收票"),
    YES(1, "已收票");

    @Getter
    private Integer value;

    @Getter
    private String label;

    ReceivableInvoiceStatusEnum(Integer value, String label) {
        this.value = value;
        this.label = label;
    }

    public static String getLabel(int value){
        if(value == 0){
            return NO.getLabel();
        }else if(value == 1){
            return YES.getLabel();
        }else{
            return NO.getLabel();
        }
    }
}
